package com.project.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.project.po.PostrecordInfo;
import com.project.po.eInfo;
import com.project.po.postrecord;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;


@Repository
public interface Mapper extends BaseMapper<postrecord> {
    @Select("SELECT p.eid,e.ename,p.pChangeDate,p.pchangebefore,p.pchangeafter from postrecord p ,employeeinformation e where p.eid=e.eid")
    List<PostrecordInfo> Getall();

    @Select("SELECT p.eid,e.ename,p.pChangeDate,p.pchangebefore,p.pchangeafter from postrecord p ,employeeinformation e where p.eid=e.eid and e.eid=#{eid}")
    List<PostrecordInfo> GetById(@Param("eid") String eid);

    @Select("SELECT e.* from employeeinformation e ")
    List<eInfo> Showall();
}
